Write Barrier
   HOME

TheInfoList



OR:

In
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s, write barrier is a mechanism for enforcing a particular ordering in a sequence of writes to a storage system in a computer system. For example, a write barrier in a
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
is a mechanism (program logic) that ensures that in-memory file system state is written out to persistent storage in the correct order.


In Garbage collection

A write barrier in a
garbage collector A waste collector, also known as a garbageman, garbage collector, trashman (in the US), binman or (rarely) dustman (in the UK), is a person employed by a public or private enterprise to collect and dispose of municipal solid waste (refuse) and r ...
is a fragment of code emitted by the compiler immediately before every store operation to ensure that (e.g.) generational invariants are maintained.


In Computer storage

A write barrier in a memory system, also known as a
memory barrier In computing, a memory barrier, also known as a membar, memory fence or fence instruction, is a type of barrier instruction that causes a central processing unit (CPU) or compiler to enforce an ordering constraint on memory operations issued be ...
, is a hardware-specific compiler intrinsic that ensures that all preceding memory operations "happen before" all subsequent ones.


See also

*
Native Command Queuing In computing, Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed. This can reduce the amount of unnecessary dri ...


References


External links


Barriers and journaling filesystems
(LWN.net, May 21, 2008) Compilers Memory management {{compu-storage-stub